<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="">
    <script src="../lib/vue-2.4.0.js"></script>
</head>
<body>
    <div id="app">
        {{msg|  msgopt1  |  msgopt2}}
    </div>
    <script>
        Vue.filter('msgopt1',function(data){
            return data.replace(/我/g,'他')
        })
        Vue.filter('msgopt2',function(data){
            return data.replace(/帅/g,'丑')
        })
        var vm=new Vue({
            el:'#app',
            data:{
                msg:'曾经我我我我特别的帅帅帅'
            }
        })
    </script>
</body>
</html>